﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Components;
using MainApp.Modules.ICStatistics;

namespace MainApp.Modules.IC.ICStatistics
{
    public partial class MainScreen : SGVScreen
    {
        public MainScreen()
            :base()
        {
            InitializeComponent();
        }

        private void XemThongTintonKho_Click(object sender, EventArgs e)
        {
            int iStockID = Convert.ToInt32(sgvStockComboBox.SelectedValue);
            int iProductCatID = Convert.ToInt32(sgvProductCatComboBox.SelectedValue);

            ((ICStatisticsModule)module).XemThongTinTonKho(iStockID, iProductCatID);
        }

        private void NXTXem_Click(object sender, EventArgs e)
        {
            DateTime dtFrom = NXTFromDatePicker.Value;
            DateTime dtTo = NXTToDatePicker.Value;
            int iStockID = Convert.ToInt32(NXTStockComboBox.SelectedValue);
            int iProductCatID = Convert.ToInt32(NXTProductCatComboBox.SelectedValue);

            if (dtFrom < dtTo)
            {
                MessageBox.Show("Ngày tháng không hợp lệ, vui lòng kiểm tra lại", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }


            
        }
    }
}
